package com.example.controller;

import com.example.domain.StudentMissionFlower;
import com.example.service.StudentMissionFlowerService;
import com.example.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: WJ
 * @CreateTime: 2025-05-21  11:29
 * @Description: TODO
 * @Version: 1.0
 */
@RestController
@RequestMapping("/studentMissionFlower")
public class StudentMissionFlowerController {
    @Autowired
    private StudentMissionFlowerService studentMissionFlowerService;
    /**
     * 根据学生id获取小红花个数
     * @param id
     * @return
     */
    @GetMapping("/getFlowerCountById/{id}")
    public Object getFlowerCountById(@PathVariable Long id){
        return AjaxResult.success(studentMissionFlowerService.getFlowerCountById(id));
    }
}
